<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title th:text="用户信息">Users</title>
    <!--默认拼接前缀路径,开头请勿再添加斜杠,防止部署运行报错！-->
    <script th:replace="common/header::static"></script>
</head>
<body>

<div th:each="user,userStat:${users}" th:class="${userStat.even}?'even':'odd'">
    序号：<input type="text" th:value="${user.id}"/>
    账号：<input type="text" th:value="${user.name}"/>
    密码：<input type="password" th:value="${user.password}"/>
    上次访问地址：<input type="text" th:value="${user.lastLogonIP}"/>
</div>

<script th:inline="javascript">
    //通过内联表达式获取用户信息
    var users = [[${users}]];
    console.log(users)
</script>
</body>
</html>